/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.view.statementView;
/**
 * 说明：
 * 商品报表主界面
 * @Author：黄盛强
 * @Date：2012-03-21
 */
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.MouseEvent;

import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JSplitPane;

import com.ruipengkj.model.ListCellRendererLabel;
import com.ruipengkj.view.base.BasePanel;

public class StatementCommodityPanel extends BasePanel {
	private static final long serialVersionUID = 1L;
	
	
//	private StatementIntoSavePin statementIntoSavePin;//进存销汇总表
	
	private CardLayout right_layout;
	private JPanel right_panel;
	private DefaultListModel listModel;
	private JList btnList;//功能按钮列表
	public StatementCommodityPanel() {
		this.setLayout(new BorderLayout());
		this.init();
	}
	
	private void init() {
		listModel=new DefaultListModel();
		btnList=new JList();
		btnList.setFixedCellHeight(35);
		btnList.setModel(listModel);
		btnList.setCellRenderer(new ListCellRendererLabel());
		btnList.addMouseListener(this);
		JSplitPane jsp = new JSplitPane();
		jsp.add(btnList, JSplitPane.LEFT, 0);
//		jsp.add(initRight(), JSplitPane.RIGHT, 0);
		jsp.setDividerLocation(180);
		this.add(jsp, BorderLayout.CENTER);
	}
	
	
//	private JPanel initRight() {
//		right_layout = new CardLayout();
//		right_panel = new JPanel(right_layout);
//		
//		statementCommodityBuy = new StatementCommodityBuy();
//		right_panel.add(statementCommodityBuy, "a");
//		right_layout.show(right_panel, "a");
//		SwingUtilities.invokeLater(statementCommodityBuy);
//		
//		return right_panel;
//	}
	
	@Override
	public void mouseClicked(MouseEvent e) {
		if (e.getClickCount() == 1) {
			switch (btnList.getSelectedIndex()) {
			
			
			}
		}
	}

	@Override
	public void clear() {
		// TODO Auto-generated method stub
		
	}
}
